<include file="Public/Header" />

<!-- right content start  -->
<div class="content-right">
	<div class="content">
		<!-- form start -->
		<form class="am-form form-validation view-save" action="{{:U('Admin/Article/Save')}}" method="POST" request-type="ajax-url" request-value="{{:U('Admin/Article/Index')}}">
			<legend>
				<span class="fs-16">
					<if condition="empty($data['id'])">
						{{:L('article_add_name')}}
					<else />
						{{:L('article_edit_name')}}
					</if>
				</span>
				<a href="{{:U('Admin/Article/Index')}}" class="fr fs-14 m-t-5 am-icon-mail-reply"> {{:L('common_operation_back')}}</a>
			</legend>
			<div class="am-form-group">
				<label>{{:L('article_title_text')}}</label>
				<div class="am-input-group am-input-group-sm">
					<input type="hidden" name="title_color" value="<if condition="!empty($data['title_color'])">{{$data.title_color}}</if>" />
					<input type="text" name="title" placeholder="{{:L('article_title_text')}}" minlength="3" maxlength="60" data-validation-message="{{:L('article_title_format')}}" class="am-form-field am-radius" <notempty name="data"> value="{{$data.title}}" </notempty> <if condition="!empty($data['title_color'])"> style="color:{{$data.title_color}};" </if> required />
					<span class="am-input-group-btn">
						<button class="am-btn am-btn-default colorpicker-submit" type="button">
							<img src="__PUBLIC__/Common/Images/colorpicker.png" />
						</button>
					</span>
				</div>
			</div>
			<div class="am-form-group">
				<label>{{:L('article_class_text')}}</label>
				<select name="article_class_id" class="am-radius c-p" data-validation-message="{{:L('article_class_format')}}" required>
					<option value="">{{:L('common_select_can_choose')}}</option>
					<foreach name="article_class_list" item="v">
						<option value="{{$v.id}}" <if condition="isset($data['article_class_id']) and $data['article_class_id'] eq $v['id']">selected</if>>{{$v.name}}</option>
					</foreach>
				</select>
			</div>
			<div class="am-form-group">
				<label>{{:L('article_jump_url_text')}}</label>
				<input type="url" name="jump_url" placeholder="{{:L('article_jump_url_text')}}" data-validation-message="{{:L('article_jump_url_format')}}" class="am-radius" <notempty name="data"> value="{{$data.jump_url}}"</notempty> />
			</div>
			<include file="Lib/Enable" />
			<div class="am-form-group">
				<label>{{:L('article_content_text')}}<span class="fs-12 fw-100 cr-999"><if condition="IsMobile()">（{{:L('article_content_format_mobile')}}）<else /><if condition="L('article_images_upload_format') neq ''">（{{:L('article_images_upload_format')}}）</if></if></span></label>
				<textarea class="am-radius am-validate" name="content" rows="5" minlength="50" maxlength="105000" <if condition="!IsMobile()">id="editor-tag" data-url="{{:U('Admin/Ueditor/Index', ['path_type'=>'Article'])}}" placeholder="{{:L('article_content_format')}}" <else /> placeholder="{{:L('article_content_format')}}{{:L('article_content_format_mobile')}}" </if> data-validation-message="{{:L('article_content_format')}}" required><notempty name="data">{{$data.content}}</notempty></textarea>
			</div>
			<div class="am-form-group">
				<input type="hidden" name="id" <notempty name="data"> value="{{$data.id}}"</notempty>" />
				<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'{{:L('common_form_loading_tips')}}'}">{{:L('common_operation_save')}}</button>
			</div>
		</form>
        <!-- form end -->
	</div>
</div>
<!-- right content end  -->

<!-- footer start -->
<include file="Public/Footer" />
<!-- footer end -->